package com.yanqu.road.entity.activity.seacraft.config;


import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.shuihuyezipai.config.ShuiHuYeZiCardActivityConfig;
import com.yanqu.road.entity.enums.eActivityConfigType;
import com.yanqu.road.utils.date.DateHelper;
import com.yanqu.road.utils.string.StringUtils;

import java.util.*;
import java.util.concurrent.ConcurrentHashMap;

/**
 * @Description 海上争霸 之南海丝路 配置
 * @Author cwq
 * @Data 2022/1/20 10:12
 */
public class SeacraftSouthSeaActivityConfig {

    /**
     * 小队人数
     */
    private static int teamNum = 6;

    /**
     * 宝库格子数
     */
    private static int pubGribNum = 9;

    /**
     * 捐献道具id
     */
    private String SEACRAFT_CRAFT_DONATE_ITEMS;

    public List<Integer> donateList = new ArrayList<>();

    /**
     * 匹配排名前后n名次
     */
    private int SEACRAFT_CRAFT_MATCH_NUM;
    /**
     * 门客小队初始突袭次数
     */
    private int SEACRAFT_CRAFT_CHARGE_TIME;
    /**
     * 主角初始突袭次数
     */
    private int SEACRAFT_CRAFT_CHARGE_SINGLE_TIME;
    /**
     * 门客小队回复攻击次数道具id
     */
    private int SEACRAFT_CRAFT_ATTACK_ITEM_ID;
    /**
     * 门客小队回复攻击次数需要消耗道具数量,数字个数=回复次数
     */
    private String SEACRAFT_CRAFT_ATTACK_ITEM_COST;

    public List<Integer> attackItemCostList = new ArrayList<>();

    /**
     * 首次购买消耗
     */
    private String SEACRAFT_CRAFT_BUFF_COST_FIRST;

    public List<Integer> firstBuyCostList = new ArrayList<>();

    /**
     * 购买消耗
     */
    private String SEACRAFT_CRAFT_BUFF_COST;

    public List<Integer> buyCostList = new ArrayList<>();

    /**
     * 购买buff 需要消耗最大的元宝数量
     */
    public int maxCostNum = 0;

    /**
     * 首次增幅（百分比）
     */
    private String SEACRAFT_CRAFT_BUFF_FIRSTADD;

    public List<Integer> firstAddBuffList = new ArrayList<>();
    /**
     * 正常增幅（百分比）
     */
    private String SEACRAFT_CRAFT_BUFF_ADD;

    public List<Integer> addBuffList = new ArrayList<>();
//    /**
//     * 连胜奖励
//     */
//    private String SEACRAFT_CRAFT_REWARD_WIN;
//
//    /**
//     * 连胜奖励 0 1 连胜区间  2 宝箱id
//     */
//    public List<Integer[]> rewardList = new ArrayList<>();

    /**
     * 连胜次数后获得连胜奖励
     */
    private int SEACRAFT_CRAFT_REWARD_COMBONUM;
    /**
     * 胜利对决奖励|失败对决奖励
     */
    private String SEACRAFT_CRAFT_REWARD_END;

    /**
     * 战斗奖励 0 胜利 1失败
     */
    public List<String> battleRewardList = new ArrayList<>();

    /**
     * 一键挑战解锁条件（次）
     */
    private int SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_NUM;
    /**
     * 一键挑战解锁条件（VIP）
     */
    private int SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_VIP;
    /**
     * 一键挑战时间限制（活动结束前n分钟不允许使用）
     */
    private int SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_TIME_FINISH;
    /**
     * 每次击败门客获得积分|扣除船只血量
     */
    private String SEACRAFT_CRAFT_KILL_POINT;

    /**
     *
     */
    public List<Integer> killPointList = new ArrayList<>();

    /**
     * 扳手道具id
     */
    private int SEACRAFT_CRAFT_WRENCH_ITEM_ID;

    /**
     * 炸药道具id
     */
    private int SEACRAFT_CRAFT_FIRE_ITEM_ID;

    /**
     * 航海勋章id
     */
    private int SEACRAFT_CRAFT_SCORE_ITEM_ID;

    /**
     * 突袭可获得海战勋章数量
     */
    private int SEACRAFT_CRAFT_CHARGE_SCORE;

    /**
     * 进攻可获得海战勋章数量=参数1+参数2*本次进攻消耗的进攻道具数量
     */
    private String SEACRAFT_CRAFT_ATTACK_SCORE;

    public List<Integer> attackScoreList = new ArrayList<>();
    /**
     * 炸药的伤害系数
     */
    private int SEACRAFT_CRAFT_FIRE_EFFECT;

    /**
     * 备战期开启时间(h)，格式：第n天,开启时间,结束时间
     */
    private String SEACRAFT_CRAFT_BEIZHAN_TIME;

    /**
     * 海盗之乱开放时间(h)，格式：第n天,开启时间,结束时间
     */
    private String SEACRAFT_CRAFT_HAIDAO_TIME;

    public int haiDaoEndTime;

    /**
     * 0:备战期开始时间   1备战期结束时间 s
     */
    public List<Long> pretimeList = new ArrayList<>();

    /**
     * 海上争霸开启时间(h)，格式：第n天,开启时间,结束时间
     */
    private String SEACRAFT_CRAFT_ZHENGBA_TIME;

    /**
     * 每轮开放的时间 0:开放的开始时间 1开放的结束时间 2 本轮晋级的数量
     */
    public List<Integer[]> roundTimeList = new ArrayList<>();

    /**
     *
     */
    private Long SEACRAFT_CRAFT_DISTANCE;

    /**
     * 海上争霸船只初始属性，初始生命值系数|初始速度,均为百分数；船只生命值=生命值系数*商会人数*(1+等级加成)
     */
    private String SEACRAFT_CRAFT_SHIP_FIRST;

    /**
     * 单次战胜N名防守成员后，播放跑马灯效果
     */
    private int SEACRAFT_CRAFT_KILL_REPORT;
    /**
     * 海上争霸保底速度参数。触发保底速度血量=最大血量*参数/1000，保底速度=最大速度*参数/1000
     */
    private int SEACRAFT_CRAFT_SPEED_MIN;

    /**
     * 造成伤害前n名显示进攻路线|受到伤害前n名显示进攻路线
     */
    private String SEACRAFT_CRAFT_SHIP_ATTACK_RANK;

    /**
     * 展示前n名已到达的船只
     */
    private int SEACRAFT_CRAFT_SHIP_DISPLAY_NUM;

    /**
     * 修理工配置，恢复血量千分比|修理时间间隔（秒）
     */
    private String SEACRAFT_CRAFT_REPAIR_PARAM;

    /**
     * 修理工配置，恢复血量千分比|修理时间间隔（秒）
     */
    private List<Integer> repairParam = new ArrayList<>();

    /**
     * 船桨道具id，低级船桨|中级船桨|高级船桨|特级船桨
     */
    private String SEACRAFT_CRAFT_PADDLE_ITEM_ID;

    /**
     * 船桨加速参数，加速幅度百分数(m/s);加速时间(秒)|加速幅度百分数(m/s);加速时间(秒)
     */
    private String SEACRAFT_CRAFT_PADDLE_ITEM_PARAM;

    /**
     * 最多只能同时存在n条船桨效果
     */
    private int SEACRAFT_CRAFT_SPEED_UP_LIMIT;

    /**
     * 船桨道具
     */
    private List<Integer> paddleItemIdList = new ArrayList<>();

    /**
     * 船桨加速参赛
     */
    private List<String> paddleItemParamList = new ArrayList<>();

    private List<Integer> attackRankList = new ArrayList<>();

    public List<Integer> shipFirstList = new ArrayList<>();

    private List<SeacraftSouthSeaShipConfig> shipList = new ArrayList<>();
    private List<SeacraftSouthSeaGuessConfig> guessList = new ArrayList<>();
    private List<SeacraftSouthSeaFloorConfig> floorList = new ArrayList<>();
    private Map<Integer, SeacraftSouthSeaFloorConfig> floorMap = new ConcurrentHashMap<>();
    private List<SeacraftSouthSeaBattleConfig> battleList = new ArrayList<>();

    /**
     * K:round : k：进攻方式 v：排名奖励集合
     */
    private Map<Integer, Map<Integer, List<SeacraftSouthSeaBattleRankInfo>>> rankBattleListMap = new ConcurrentHashMap<>();
    /**
     * 竞猜数量 k:南海丝路轮次 1 2  每轮竞猜联盟的最高数量
     */
    private Map<Integer, Integer> guessUnionNumMap = new ConcurrentHashMap<>();

    /**
     * 竞猜奖励 k:轮次  v ：奖励 竞猜数量 升序
     */
    private Map<Integer, List<SeacraftSouthSeaGuessConfig>> guessRoundListMap = new ConcurrentHashMap<>();

    /**
     * 初始化活动配置
     *
     * @return
     */
    public void parseConfig(Map<String, ActivityConfig> activityConfigMap) {
        SEACRAFT_CRAFT_DONATE_ITEMS = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_DONATE_ITEMS.getName()).getValue();
        SEACRAFT_CRAFT_MATCH_NUM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_MATCH_NUM.getName()).getIntValue();
        SEACRAFT_CRAFT_CHARGE_TIME = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_CHARGE_TIME.getName()).getIntValue();
        SEACRAFT_CRAFT_CHARGE_SINGLE_TIME = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_CHARGE_SINGLE_TIME.getName()).getIntValue();
        SEACRAFT_CRAFT_ATTACK_ITEM_ID = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_ATTACK_ITEM_ID.getName()).getIntValue();
        SEACRAFT_CRAFT_ATTACK_ITEM_COST = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_ATTACK_ITEM_COST.getName()).getValue();
        SEACRAFT_CRAFT_BUFF_COST_FIRST = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_BUFF_COST_FIRST.getName()).getValue();
        SEACRAFT_CRAFT_BUFF_COST = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_BUFF_COST.getName()).getValue();
        SEACRAFT_CRAFT_BUFF_FIRSTADD = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_BUFF_FIRSTADD.getName()).getValue();
        SEACRAFT_CRAFT_BUFF_ADD = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_BUFF_ADD.getName()).getValue();
//        SEACRAFT_CRAFT_REWARD_WIN = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_REWARD_WIN.getName()).getValue();
        SEACRAFT_CRAFT_REWARD_COMBONUM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_REWARD_COMBONUM.getName()).getIntValue();
        SEACRAFT_CRAFT_REWARD_END = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_REWARD_END.getName()).getValue();
        SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_NUM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_NUM.getName()).getIntValue();
        SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_VIP = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_VIP.getName()).getIntValue();
        SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_TIME_FINISH = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_TIME_FINISH.getName()).getIntValue();
        SEACRAFT_CRAFT_KILL_POINT = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_KILL_POINT.getName()).getValue();
        SEACRAFT_CRAFT_WRENCH_ITEM_ID = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_WRENCH_ITEM_ID.getName()).getIntValue();
        SEACRAFT_CRAFT_FIRE_ITEM_ID = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_FIRE_ITEM_ID.getName()).getIntValue();
        SEACRAFT_CRAFT_SCORE_ITEM_ID = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SCORE_ITEM_ID.getName()).getIntValue();
        SEACRAFT_CRAFT_CHARGE_SCORE = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_CHARGE_SCORE.getName()).getIntValue();
        SEACRAFT_CRAFT_ATTACK_SCORE = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_ATTACK_SCORE.getName()).getValue();
        SEACRAFT_CRAFT_BEIZHAN_TIME = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_BEIZHAN_TIME.getName()).getValue();
        SEACRAFT_CRAFT_HAIDAO_TIME = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_HAIDAO_TIME.getName()).getValue();
        SEACRAFT_CRAFT_ZHENGBA_TIME = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_ZHENGBA_TIME.getName()).getValue();
        SEACRAFT_CRAFT_DISTANCE = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_DISTANCE.getName()).getLongValue();
        SEACRAFT_CRAFT_SHIP_FIRST = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SHIP_FIRST.getName()).getValue();
        SEACRAFT_CRAFT_KILL_REPORT = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_KILL_REPORT.getName()).getIntValue();
        SEACRAFT_CRAFT_SPEED_MIN = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SPEED_MIN.getName()).getIntValue();
        SEACRAFT_CRAFT_SHIP_ATTACK_RANK = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SHIP_ATTACK_RANK.getName()).getValue();
        SEACRAFT_CRAFT_SHIP_DISPLAY_NUM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SHIP_DISPLAY_NUM.getName()).getIntValue();
        SEACRAFT_CRAFT_REPAIR_PARAM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_REPAIR_PARAM.getName()).getValue();
        SEACRAFT_CRAFT_PADDLE_ITEM_ID = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_PADDLE_ITEM_ID.getName()).getValue();
        SEACRAFT_CRAFT_PADDLE_ITEM_PARAM = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_PADDLE_ITEM_PARAM.getName()).getValue();
        SEACRAFT_CRAFT_SPEED_UP_LIMIT = activityConfigMap.get(eActivityConfigType.SEACRAFT_CRAFT_SPEED_UP_LIMIT.getName()).getIntValue();

        donateList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_DONATE_ITEMS, "\\|");
        attackItemCostList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_ATTACK_ITEM_COST, "\\|");
        firstBuyCostList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_BUFF_COST_FIRST, "\\|");
        buyCostList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_BUFF_COST, "\\|");
        killPointList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_KILL_POINT, "\\|");
        battleRewardList = StringUtils.stringToStringList(SEACRAFT_CRAFT_REWARD_END, "\\|");
        attackScoreList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_ATTACK_SCORE, "\\|");
        attackRankList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_SHIP_ATTACK_RANK, "\\|");
        repairParam = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_REPAIR_PARAM, "\\|");
        paddleItemIdList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_PADDLE_ITEM_ID, "\\|");
        paddleItemParamList = StringUtils.stringToStringList(SEACRAFT_CRAFT_PADDLE_ITEM_PARAM, "\\|");

//        String[] reward = SEACRAFT_CRAFT_REWARD_WIN.split("\\|");
//        for (String item : reward) {
//            String[] rewardParamStr = item.split(",");
//            Integer[] rewardParam = new Integer[3];
//            rewardParam[0] = Integer.valueOf(rewardParamStr[0]);
//            rewardParam[1] = Integer.valueOf(rewardParamStr[1]);
//            rewardParam[2] = Integer.valueOf(rewardParamStr[2]);
//            rewardList.add(rewardParam);
//        }

        // 购买buff 需要消耗最大的元宝数量
        firstBuyCostList.forEach(e -> {
            if (e > maxCostNum) {
                maxCostNum = e;
            }
        });
        buyCostList.forEach(e -> {
            if (e > maxCostNum) {
                maxCostNum = e;
            }
        });
        firstAddBuffList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_BUFF_FIRSTADD, "\\|");
        addBuffList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_BUFF_ADD, "\\|");

        List<Integer> tempPreTimeList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_BEIZHAN_TIME, ";");
        pretimeList.add(tempPreTimeList.get(0) * DateHelper.HOUR_SECONDS);
        pretimeList.add(tempPreTimeList.get(1) * DateHelper.HOUR_SECONDS);


        String[] roundTimeListStr = SEACRAFT_CRAFT_ZHENGBA_TIME.split("\\|");
        for (String str : roundTimeListStr) {
            List<Integer> paramStrList = StringUtils.stringToIntegerList(str, ";");
            Integer[] roundTime = new Integer[3];
            roundTime[0] = (int) (paramStrList.get(0) * DateHelper.HOUR_SECONDS);
            roundTime[1] = (int) (paramStrList.get(1) * DateHelper.HOUR_SECONDS);
            roundTime[2] = paramStrList.get(2);
            roundTimeList.add(roundTime);
        }

        // 解析海盗之乱结束时间
        List<Integer> haiDaoTimeList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_HAIDAO_TIME, ";");
        haiDaoEndTime = (int) (haiDaoTimeList.get(1) * DateHelper.HOUR_SECONDS);

        shipFirstList = StringUtils.stringToIntegerList(SEACRAFT_CRAFT_SHIP_FIRST, "\\|");

        guessList.forEach(e -> {
            int count = guessUnionNumMap.getOrDefault(e.getRound(), 0);
            if (count == 0 || e.getCount() > count) {
                guessUnionNumMap.put(e.getRound(), e.getCount());
            }
            List<SeacraftSouthSeaGuessConfig> guessList = guessRoundListMap.get(e.getRound());
            if (guessList == null) {
                guessList = new ArrayList<>();
                guessRoundListMap.put(e.getRound(), guessList);
            }
            guessList.add(e);
        });

        guessRoundListMap.values().forEach(e -> {
            e.sort((t1, t2) -> {
                return Integer.compare(t1.getCount(), t2.getCount());
            });
        });

        floorList.forEach(e -> {
            floorMap.put(e.getFloor(), e);
        });
        // k:round k:type k rank
        Map<Integer, Map<Integer, Map<Integer, List<SeacraftSouthSeaBattleConfig>>>> tempRankBattleMap = new HashMap<>();
        battleList.forEach(e -> {
            Map<Integer, Map<Integer, List<SeacraftSouthSeaBattleConfig>>> roundMap = tempRankBattleMap.get(e.getRound());
            if (roundMap == null) {
                roundMap = new HashMap<>();
                tempRankBattleMap.put(e.getRound(), roundMap);
            }
            Map<Integer, List<SeacraftSouthSeaBattleConfig>> typeMap = roundMap.get(e.getType());
            if (typeMap == null) {
                typeMap = new HashMap<>();
                roundMap.put(e.getType(), typeMap);
            }
            List<SeacraftSouthSeaBattleConfig> rankList = typeMap.get(e.getRank());
            if (rankList == null) {
                rankList = new ArrayList<>();
                typeMap.put(e.getRank(), rankList);
            }
            rankList.add(e);
        });

        for (Map.Entry<Integer, Map<Integer, Map<Integer, List<SeacraftSouthSeaBattleConfig>>>> entry : tempRankBattleMap.entrySet()) {
            int round = entry.getKey();
            Map<Integer, List<SeacraftSouthSeaBattleRankInfo>> roundMap = rankBattleListMap.get(round);
            if (roundMap == null) {
                roundMap = new HashMap<>();
                rankBattleListMap.put(round, roundMap);
            }
            for (Map.Entry<Integer, Map<Integer, List<SeacraftSouthSeaBattleConfig>>> rankEntry : entry.getValue().entrySet()) {
                int type = rankEntry.getKey();
                List<SeacraftSouthSeaBattleRankInfo> rankInfoList = roundMap.get(type);
                if (rankInfoList == null) {
                    rankInfoList = new ArrayList<>();
                    roundMap.put(type, rankInfoList);
                }
                for (Map.Entry<Integer, List<SeacraftSouthSeaBattleConfig>> rankBattleEntry : rankEntry.getValue().entrySet()) {
                    int rank = rankBattleEntry.getKey();
                    rankInfoList.add(new SeacraftSouthSeaBattleRankInfo(rank, rankBattleEntry.getValue()));
                }
            }
        }
        rankBattleListMap.values().forEach(a -> {
            a.values().forEach(e -> {
                e.sort((t1, t2) -> {
                    return Integer.compare(t1.getRank(), t2.getRank());
                });
            });
        });
    }

    public int getSEACRAFT_CRAFT_MATCH_NUM() {
        return SEACRAFT_CRAFT_MATCH_NUM;
    }

    public int getSEACRAFT_CRAFT_CHARGE_TIME() {
        return SEACRAFT_CRAFT_CHARGE_TIME;
    }

    public int getSEACRAFT_CRAFT_CHARGE_SINGLE_TIME() {
        return SEACRAFT_CRAFT_CHARGE_SINGLE_TIME;
    }

    public int getSEACRAFT_CRAFT_ATTACK_ITEM_ID() {
        return SEACRAFT_CRAFT_ATTACK_ITEM_ID;
    }

    public int getSEACRAFT_CRAFT_REWARD_COMBONUM() {
        return SEACRAFT_CRAFT_REWARD_COMBONUM;
    }

    public int getSEACRAFT_CRAFT_QUICKFIGHT_LIMIT_NUM() {
        return SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_NUM;
    }

    public int getSEACRAFT_CRAFT_QUICKFIGHT_LIMIT_VIP() {
        return SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_VIP;
    }

    public int getSEACRAFT_CRAFT_QUICKFIGHT_LIMIT_TIME_FINISH() {
        return SEACRAFT_CRAFT_QUICKFIGHT_LIMIT_TIME_FINISH;
    }

    public int getSEACRAFT_CRAFT_WRENCH_ITEM_ID() {
        return SEACRAFT_CRAFT_WRENCH_ITEM_ID;
    }

    public int getSEACRAFT_CRAFT_FIRE_ITEM_ID() {
        return SEACRAFT_CRAFT_FIRE_ITEM_ID;
    }

    public int getSEACRAFT_CRAFT_SHIP_DISPLAY_NUM() {
        return SEACRAFT_CRAFT_SHIP_DISPLAY_NUM;
    }

    public int getSEACRAFT_CRAFT_FIRE_EFFECT() {
        return SEACRAFT_CRAFT_FIRE_EFFECT;
    }

    public void setSEACRAFT_CRAFT_FIRE_EFFECT(int SEACRAFT_CRAFT_FIRE_EFFECT) {
        this.SEACRAFT_CRAFT_FIRE_EFFECT = SEACRAFT_CRAFT_FIRE_EFFECT;
    }

    public int getSEACRAFT_CRAFT_SCORE_ITEM_ID() {
        return SEACRAFT_CRAFT_SCORE_ITEM_ID;
    }

    public Long getSEACRAFT_CRAFT_DISTANCE() {
        return SEACRAFT_CRAFT_DISTANCE;
    }

    public static int getTeamNum() {
        return teamNum;
    }

    public int getSEACRAFT_CRAFT_CHARGE_SCORE() {
        return SEACRAFT_CRAFT_CHARGE_SCORE;
    }

    public int getSEACRAFT_CRAFT_KILL_REPORT() {
        return SEACRAFT_CRAFT_KILL_REPORT;
    }

    public int getSEACRAFT_CRAFT_SPEED_MIN() {
        return SEACRAFT_CRAFT_SPEED_MIN;
    }

    public static void setTeamNum(int teamNum) {
        SeacraftSouthSeaActivityConfig.teamNum = teamNum;
    }

    public Map<Integer, Integer> getGuessUnionNumMap() {
        return guessUnionNumMap;
    }

    public static int getPubGribNum() {
        return pubGribNum;
    }

    public Map<Integer, List<SeacraftSouthSeaGuessConfig>> getGuessRoundListMap() {
        return guessRoundListMap;
    }

    public List<SeacraftSouthSeaShipConfig> getShipList() {
        return shipList;
    }

    public void setShipList(List<SeacraftSouthSeaShipConfig> shipList) {
        this.shipList = shipList;
    }

    public List<SeacraftSouthSeaGuessConfig> getGuessList() {
        return guessList;
    }

    public void setGuessList(List<SeacraftSouthSeaGuessConfig> guessList) {
        this.guessList = guessList;
    }

    public List<SeacraftSouthSeaFloorConfig> getFloorList() {
        return floorList;
    }

    public void setFloorList(List<SeacraftSouthSeaFloorConfig> floorList) {
        this.floorList = floorList;
    }

    public List<Integer> getAttackRankList() {
        return attackRankList;
    }

    public Map<Integer, SeacraftSouthSeaFloorConfig> getFloorMap() {
        return floorMap;
    }

    public void setFloorMap(Map<Integer, SeacraftSouthSeaFloorConfig> floorMap) {
        this.floorMap = floorMap;
    }

    public List<Integer> getRepairParam() {
        return repairParam;
    }

    public void setBattleList(List<SeacraftSouthSeaBattleConfig> battleList) {
        this.battleList = battleList;
    }

    public List<SeacraftSouthSeaBattleConfig> getBattleList() {
        return battleList;
    }

    public int getSEACRAFT_CRAFT_SPEED_UP_LIMIT() {
        return SEACRAFT_CRAFT_SPEED_UP_LIMIT;
    }

    public List<Integer> getPaddleItemIdList() {
        return new ArrayList<>(paddleItemIdList);
    }

    /**
     * 是否是船桨道具
     *
     * @return
     */
    public boolean hasPaddleId(int propId) {
        return paddleItemIdList.contains(propId);
    }

    /**
     * 获取击杀奖励
     *
     * @param round        当前轮次
     * @param type         1突袭 2进攻
     * @param rank
     * @param winStreakNum
     * @return
     */
    public int getWinStreakReward(int round, int type, int rank, int winStreakNum) {
        SeacraftSouthSeaBattleConfig battleConfig = null;
        Map<Integer, List<SeacraftSouthSeaBattleRankInfo>> roundMap = rankBattleListMap.get(round);
        if(roundMap != null){
            List<SeacraftSouthSeaBattleRankInfo> rankBattleList = roundMap.get(type);
            if (rankBattleList != null) {
                for (SeacraftSouthSeaBattleRankInfo item : rankBattleList) {
                    if (rank <= item.getRank()) {
                        for (SeacraftSouthSeaBattleConfig tempBattleConfig : item.getBattleList()) {
                            battleConfig = tempBattleConfig;
                            if ((winStreakNum / SEACRAFT_CRAFT_REWARD_COMBONUM) <= tempBattleConfig.getVictoryTime()) {
                                break;
                            }
                        }
                        break;
                    }
                }
            }
            if (battleConfig != null) {
                return battleConfig.getAward();
            }
        }
        return 0;
    }

    /**
     * @param propId
     * @return
     */
    public String getSpeedParam(int propId) {
        int index = paddleItemIdList.indexOf(propId);
        if (index >= 0) {
            return paddleItemParamList.get(index);
        }
        return "";
    }


}
